//
//  ViewController.m
//  ZSCategories-master
//
//  Created by safiri on 2018/7/3.
//  Copyright © 2018年 safiri. All rights reserved.
//

#import "ViewController.h"
#import "NSDateHeader.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSDate *date1 = [NSDate dateWithString:@"2018-11-20" format:@"yyyy-MM-dd"];
    NSTimeInterval times = [NSDate timeDistanceSecondsBetweenDate:[NSDate date] toDate:date1];
    double d = times/(24*60*60);
    NSInteger day = ceil(d);
    
    
    NSLog(@"times %f, day %ld",times, (long)day);
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
